﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Workflow2211A.Consol.Steps;
using WorkflowCore.Interface;

namespace Workflow2211A.Consol.Workflows
{
    public class MoreResultWorkflow : IWorkflow
    {
        public string Id => nameof(MoreResultWorkflow);

        public int Version => 1;

        [Obsolete]
        public void Build(IWorkflowBuilder<object> builder)
        {
            builder.StartWith<StartStep>()
                   .Then<RandStep>(rand => 
                   {
                       rand.When(0)
                       .Then<TaskA>()
                       .Then<TaskB>()
                       .Then<EndStep>();

                       rand.When(1)
                       .Then<TaskC>()
                       .Then<TaskD>()
                       .Then<EndStep>();
                   });
        }
    }
}
